package com.lipaluma.examples.annotation.shoes;

import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;

import com.lipaluma.annotations.config.ValidationStrategy;
import com.lipaluma.annotations.mapping.MapColumn;
import com.lipaluma.annotations.validations.Validate;
import com.lipaluma.field.validator.strategies.ValidationStrategyEnum;

@CSV(delimiter=';', hasHeader=true, mapColumnsByHeaders=true)
public class ShoeWithList {
	@MapColumn
	private String mark;
	
	@MapColumn
	private String modele;
	
	@MapColumn(separator="|", keepAll=true, trim=true)
	private List<Integer> sizes;

	@MapColumn(separator="|", trim=true)
	@Validate(unique=true)
	@ValidationStrategy(ValidationStrategyEnum.FILTER_VALIDATION_ERRORS)
	private Collection<Color> colors = new LinkedHashSet<Color>();

	
	@MapColumn
	private double price;
	
	public String getMark() {
		return mark;
	}
	public String getModele() {
		return modele;
	}
	public List<Integer> getSizes() {
		return sizes;
	}
	public double getPrice() {
		return price;
	}
	public Collection<Color> getColors() {
		return colors;
	}
}
